<div class="main">
	<div class="wrap">
		<div class="section group">
		  <div class="cont span_2_of_3">
		  	<h2 class="head">Sản phẩm mới</h2>
		  	<?php
		  		$i = 1;
		  		$num_prods = count($new_products);
		  		foreach ($new_products as $product):	
		  			if( $i % 4 == 0 || $i == 1 )
		  			{
		  				echo '<div class="top-box">';
		  			}
		  	?>			
			 <div class="col_1_of_3 span_1_of_3"> 
			   <a href="<?=site_url('home/product_detail/'.$product['id']) ?>">
				<div class="inner_content clearfix">
					<div class="product_image">
						<img src="<?=base_url('upload/image/products/'.$product['thumb']) ?>" alt=""/>
					</div>
                    <div class="sale-box"><span class="on_sale title_shop">New</span></div>	
                    <div class="price">
					   <div class="cart-left">
							<p class="title"><?=$product['name'] ?></p>
							<div class="price1">
							  <span class="actual"><?=$product['price'] ?></span>
							</div>
						</div>
						<div class="cart-right"> </div>
						<div class="clear"></div>
					 </div>				
                   </div>
                 </a>
				</div>			   							
			<?php
					if( $i % 3 == 0 || $i == $num_prods )
					{
						echo '<div class="clear"></div>';
						echo '</div>';
					}
					$i++;
				endforeach;
			?>					  	        		 						 			  
		  </div>
			<div class="rsidebar span_1_of_left">
				<div class="top-border"> </div>
				 <div class="border">
	             <link href="<?=base_url($template_path.'css/default.css') ?>" rel="stylesheet" type="text/css" media="all" />
	             <link href="<?=base_url($template_path.'css/nivo-slider.css') ?>" rel="stylesheet" type="text/css" media="all" />
				  <script src="<?=base_url($template_path.'js/jquery.nivo.slider.js') ?>"></script>
				    <script type="text/javascript">
				    $(window).load(function() {
				        $('#slider').nivoSlider();
				    });
				    </script>
		    <div class="slider-wrapper theme-default">
              <div id="slider" class="nivoSlider">
                <img src="<?=base_url($template_path.'images/t-img1.jpg') ?>"  alt="" />
               	<img src="<?=base_url($template_path.'images/t-img2.jpg') ?>"  alt="" />
                <img src="<?=base_url($template_path.'images/t-img3.jpg') ?>"  alt="" />
              </div>
             </div>
              <div class="btn"><a href="single.html">Check it Out</a></div>
             </div>
           <div class="top-border"> </div>
			<div class="sidebar-bottom">
			    <h2 class="m_1">Đăng ký<br> nhận thư</h2>
			    <p class="m_text">Nhập địa chỉ email của bạn</p>
			    <div class="subscribe">
					 <form>
					    <input name="userName" type="text" class="textbox">
					    <input type="submit" value="Subscribe">
					 </form>
	  			</div>
			</div>
	    </div>
	   <div class="clear"></div>
	</div>
	</div>
	</div>